import request from '@/utils/request'

export function getBuildList(params) {
  return request({ // 查询住房列表
    url: '/PMSystem/t-build',
    method: 'get',
    params
  })
}

export function deleteBuildById(id) { // 根据id删除住房
  return request({
    url: `/PMSystem/t-build/${id}`,
    method: 'delete'
  })
}

export function addBuild(params) { // 新增住房
  return request({
    url: '/PMSystem/t-build',
    method: 'post',
    data: params
  })
}

export function editBuildById(id, body) { // 根据id编辑住房信息
  return request({
    url: `/PMSystem/t-build/${id}`,
    method: 'put',
    data: body
  })
}
